
#ifndef DESIGN_PATTERNS_OBSERVER_COMPONENT_H
#define DESIGN_PATTERNS_OBSERVER_COMPONENT_H

#include "Publisher.h"
#include "Observer.h"
#include "Event.h"

namespace observer {
class Component {
private:
    Publisher * _publisher;

public:
    explicit Component(Publisher * publisher);

    void add_event_observer(Observer * o);

    void del_event_observer(Observer * o);

    void notify(Event * e);

    virtual ~Component();
};
}

#endif //DESIGN_PATTERNS_OBSERVER_COMPONENT_H
